package jp.eisbahn.mgapi;

import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

import jp.eisbahn.mgapi.auth.ClientConfig;

public class Utils {

    public static ClientConfig createClientConfig() {
        ClientConfig config = new ClientConfig();
        config.setClientId("clientId1");
        config.setClientSecret("clientSecret1");
        config.setRedirectUri("redirectUri1");
        return config;
    }

    public static ClientConfig createRealClientConfig() {
        ClientConfig config = new ClientConfig();
        config.setClientId("f7c607ffc78affa8b38c");
        config.setClientSecret("87b28a1f2513177404502e7f59f69710ed1925ed");
        config.setRedirectUri("http://www.eisbahn.jp/redirect");
        return config;
    }

    public static Date createDate(
            int year, int month, int date, int hour, int minute, int second) {
        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("JST"));
        cal.clear();
        cal.set(Calendar.YEAR, year);
        cal.set(Calendar.MONTH, month - 1);
        cal.set(Calendar.DATE, date);
        cal.set(Calendar.HOUR_OF_DAY, hour);
        cal.set(Calendar.MINUTE, minute);
        cal.set(Calendar.SECOND, second);
        return cal.getTime();
    }

}
